﻿using Portal.Model;

namespace Portal.Logic.Services
{
	/// <summary>
	/// Interface <see cref="IUserInfoService"/> declare user info service
	/// </summary>
	public interface IUserInfoService
	{
		/// <summary>
		/// Gets user info by user
		/// </summary>
		/// <param name="user">The user.</param>
		/// <returns>
		/// User info
		/// </returns>
		IUserInfo GetBy(IUser user);

		/// <summary>
		/// Validates user info
		/// </summary>
		/// <param name="userInfo">The user info</param>
		/// <returns>True if valid</returns>
		bool IsValid(IUserInfo userInfo);

		/// <summary>
		/// Saves user info
		/// </summary>
		/// <param name="userInfo">The user info</param>
		void Save(IUserInfo userInfo);
	}
}